*** REPLICATION TOOLKIT ***

* AUTHORS: CIMINELLI DUVAL FURCERI 

* ARTICLE: EMPLOYMENT PROTECTION DEREGULATION AND LABOR SHARES IN ADVANCED ECONOMIES 

* JOURNAL: REVIEW OF ECONOMICS AND STATISTICS

* OUTPUT: FIGURE A1 (ONLINE APPENDIX)

***************************

cd ""

use "DTA files/Dataset", clear

**************** CHART WITH DISTRIBUTION OF REFORMS *******************

drop if industry != "A"

gen r1 = EPLregularworkers
gen r2 = EPLregularworkers

replace r1 = 0 if r1 < 0
replace r2 = 0 if r2 > 0

replace r2 = -1*r2

egen tr1 = total(r1), by(year)
egen tr2 = total(r2), by(year)

collapse (mean) tr1 (mean) tr2,  by(year)

egen trend = group(year)
foreach x in trend tr1 tr2 {
replace `x' = . if year == 2014 | year == 2015
}
gen label = string(year)
replace label = "" if year == 2014 | year == 2015

graph bar tr1 tr2,  bar(1,color(green)) bar(2,color(red)) over(label,  relabel(1 "1970" 2 " " 3 " " 4 " " 5 " " 6 "1975" 7" " 8" "9" "10" "11"1980"12" "13" "14" "15" "16"1985"17" "18" "19" "20" "21"1990"22" "23" "24" "25" "26"1995"27" "28" "29" "30" "31"2000"32" "33" "34" "35" "36"2005"37" "38" "39" "40" "41"2010"42" "43" "44" "45" " ) sort(trend) label(angle(65)))  legend(label(1 "Liberalizing reforms") label(2 "Tightening reforms"))  graphregion(color(white))
graph export "Figures/A1.png", replace
